package com.example.neusoft.ui_demo;


import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.example.neusoft.ui_demo.beans.Dish;
import com.example.neusoft.ui_demo.recyclerview.RecyclerViewActivity;
import com.example.neusoft.ui_demo.retrofitservice.RetrofitService;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.List;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class MainActivity extends AppCompatActivity {

    private EditText usernameView,passwordView;
    private Button loginButton;
    private Button registerButton;
    private TextView textView;
    private ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        textView=findViewById(R.id.textView1);
        imageView=findViewById(R.id.imageView2);
        loginButton = findViewById(R.id.button2_login);
        registerButton = findViewById(R.id.button3_register);
        registerButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MainActivity.this,RegisterActivity.class);
                startActivity(intent);
            }
        });
        loginButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //启动界面
                Intent intent = new Intent();
                intent.setClass(MainActivity.this,RecyclerViewActivity.class);
                startActivity(intent);
//            finish();

            }
        });



    }

}
